<?php include "inc/conn.php";?><?php include "inc/pubs.php";?>
<?php include "inc/safe.php";?><?php include "inc/sqls.php";?>
<?php
//显示店铺信息页面
$pagesize = "10";//修改每页个数
$page = trim($_GET["page"]);
$pici = trim($_GET["pi"]);
$th = $_COOKIE['name'];
$dn = $_COOKIE['pass'];
//判断是否记忆登陆
If($dn == md5($th.$ao)){
}else{
webalert("请先登陆(I1)!","login.php?tt=".$tts);
}
?><!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0" />
<meta name="apple-esle-web-app-capable" content="yes" />
<title>店铺查询</title>
<meta name="author" content="yujianyue, admin@ewuyi.net">
<meta name="copyright" content="www.12391.net">
<link href="inc/css/style.css<?php echo $dp; ?>" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="inc/js/js.js<?php echo $dp; ?>"></script>
<!--- <?php echo $ad; ?> --->
</head>
<body onLoad="inst();">
<div class="html">
<div class="divs" id="divs">
<div id="head" class="head" >
<div class="bs">网点列表</div>
<div class="back" id="le">
<ul id="menu" class="center">
<li class="menu"><a href="#" class="btn">更多</a>
<dl class="list" id="list">
<li><a href="index.php?t=<?php echo $tts; ?>" class="d">我的预约</a></li>
<li><a href="bang.php?t=<?php echo $tts; ?>" class="d">我要预约</a></li>
<?php
if(file_exists($ld)){
$xi = Trim(fi($ld, 2));
if($xi == md5($th)){
?>
<li><a href="list.php?t=<?php echo $tts; ?>" class="d">所有预约</a></li>
<li><a href="down.php?t=<?php echo $tts; ?>" class="d">导出预约</a></li>
<?php
}
}
?>
</dl></li>
</ul>
</div>
</div>
<div class="main" id="main">
<?php
$ename = $cuser;
$urls= "";
if(strlen($pici)>1){
$wf = " WHERE `预约批次` = '{$pici}' AND `check` > -1 ";
}else{
$wf = " WHERE `check` > -1 ";
}
$db=ConnectMysqli::getIntance($conn);
$sql="SELECT COUNT(*)  FROM `{$no}_shop` {$wf} ";
$list=$db->getRow($sql);
$lf=$list['COUNT(*)'];
$pagecount = bcdiv($lf+$pagesize-1,$pagesize,0); //算出总页数
if(!isset($page)) $page = 1; //如果没有指定显示页码，缺省为显示第一页
if(!is_numeric($page)) $page = 1;
if($page<1) $page = 1; //如果页码比1小，则显示第一页
if($page>$pagecount) $page = $pagecount; //如果页码比总页数大，则显示最后一页
$p = $page * $pagesize + 1 - $pagesize -1;
if($p<0) $p = 0; //按理说$page肯定大于1这行不用加
$sql="SELECT *  FROM `{$no}_shop` {$wf}";
//$sql.=" ORDER BY `ID` DESC "; //如需定义删行首双斜杠并修改字段ID为自定义字段
$sql.=" limit $p, $pagesize";
$list=$db->getAll($sql);
//echo json_encode($list);
echo "<h1>&nbsp;</h1>\r\n";
echo "<div style=\"margin:0 auto;overflow-x:auto;width:98%;max-width:1188px;\">";
echo "\r\n<!--startprint-->\r\n<h1></h1>\r\n";
echo "<table cellspacing=\"0\" class=\"table\"> \r\n";
$ii=0;
if($p<0) $p = 0; //如果
foreach ($list as $lina ) {
$ii++;
if($ii=="1"){
echo "\r\n<thead>\r\n<tr class=\"tt\">\r\n";
$li=0;
foreach ($lina as $il => $de ) {
if(stristr($cd,"-{$il}-")){
echo "<!--隐藏列-->\r\n";
}else{
$li++;
echo "<td><nobr>$il</nobr></td>\r\n";
}
}
echo "</tr>\r\n</thead>\r\n";
echo "\r\n<tbody>\r\n";
}
echo "\r\n<tr>\r\n";
foreach ($lina as $il => $de ) {
if(stristr($cd,"-{$il}-")){
echo "<!--hidden 1 lie-->\r\n";
}else{
echo "<td data-label=\"{$il}：\">$de</td>\r\n";
}
}
echo "</tr>\r\n";
}
if($ii<1){
echo "<tr>\r\n";
echo "<td data-label=\"查询提示：\" colspan=\"{$li}\">暂无店铺</td>\r\n";
echo "</tr>\r\n";
echo "</tbody>\r\n";
echo "</table>\r\n";
}else{
echo "</tbody>\r\n";
echo "</table>\r\n";
if($pagecount>1){ //页码比0大，表示有数据
echo "<br><table cellspacing=\"0\" class=\"table\"> \r\n";
echo "<tbody> <!-- colspan=\"{$li}\" -->\r\n<tr><td data-label=\"页码：\" >";
if($page>1){
echo '<a href="?page=1' . $urls . '">首页</a> ';
echo '<a href="?page='. ($page-1) . '' . $urls . '">前页</a> ';
	}
if($page<$pagecount){
echo '<a href="?page='. ($page+1) . '' . $urls . '">后页</a> ';
echo '<a href="?page=' . $pagecount . '' . $urls . '">尾页</a> ';
	}
echo '页次<b>' . $page . '</b>/<b>' . $pagecount . '</b> ';
echo '<b>' . $pagesize . '</b>条/页 ';
echo "共<b>$lf</b>条 </td><tr>";
echo "</tbody> \r\n</table>\r\n";
}
}
echo "\r\n<!--endprint-->\r\n</div>\r\n";
?>
</div>
<div class="boto" id="boto">
&copy;<?php echo date('Y');?>&nbsp;
<a href="<?php echo $lw;?>" target="_blank"><?php echo $copyr;?></a>
</div>
</div>
</div>
</body>
</html>